import { forwardRef, Module } from '@nestjs/common';

import { DeliverModule } from '@/atm/deliver/deliver.module';
import { DeviceCargoLaneModule } from '@/atm/device-cargo-lane/device-cargo-lane.module';
import { DeviceExchangeLogModule } from '@/atm/device-exchange-log/device-exchange-log.module';

import { PointsHistoryModule } from '../points-history/points-history.module';
import { ProductModule } from '../product/product.module';
import { OrderController } from './order.controller';
import { Providers } from './order.providers';
import { OrderService } from './order.service';

@Module({
  imports: [
    DeliverModule,
    PointsHistoryModule,
    DeviceExchangeLogModule,
    forwardRef(() => DeviceCargoLaneModule),
    forwardRef(() => ProductModule),
  ],
  controllers: [OrderController],
  providers: [...Providers, OrderService],
  exports: [OrderService],
})
export class OrderModule {}
